Understanding the ::marker Pseudo-Element in CSS
The ::marker pseudo-element is used to style the marker box of list items, such as bullets in unordered lists or numbers in ordered lists. It allows you to customize the appearance of list markers without altering the HTML content.
::marker targets only the marker portion of <li> elements, not the content text.
You can style properties like color, font-size, font-weight, and content for the marker.
Other CSS properties, like margin or padding, generally do not apply to ::marker.
Useful for customizing bullets, numbers, or symbols in lists to match design aesthetics.
In this example, the ::marker pseudo-element changes the bullet color to red, increases its size, and replaces the default bullet with a star symbol. This is all achieved without modifying the HTML structure of the list.
Use ::marker for purely visual customization of list markers.
Avoid adding essential content in markers that users need to read, as screen readers may treat them differently.
Combine with relative units or em for scalable and responsive marker styling.
Test across browsers, as some older browsers may have limited support for ::marker styling.
How would you change the color of bullet points in an unordered list to red using CSS?
What happens if you try to set font-size on ::marker but the list item has no explicit font-size defined?
You’re told the bullets in a list aren’t showing up — what CSS property might be accidentally set to none?
A designer wants custom checkmark icons instead of bullets in a todo list — how would you implement that with ::marker, and what fallbacks would you consider for older browsers?
Our list indicators are misaligned after adding a custom font — what debugging steps would you take to fix ::marker positioning?
Why did our ::marker styles stop working after we switched from ul/li to a div-based component with aria-role?
We’re building a scalable component library with customizable list indicators — how would you design the CSS architecture to support theme-driven ::marker styles without bloating the stylesheet?
In a high-performance UI with hundreds of dynamic lists, how would you evaluate whether ::marker styling impacts layout reflow or paint performance compared to using pseudo-elements on li?
How would you handle ::marker styling in a system that supports RTL languages and needs to flip marker positions automatically?
We’re migrating a legacy product from list-style-image to ::marker — what cross-browser compatibility risks and accessibility implications must you coordinate across design, engineering, and QA teams?
How would you architect a CSS strategy for ::marker that supports both modern browsers and legacy enterprise systems without forcing a full CSS reset or polyfill?
A global design system uses ::marker for hierarchical indicators across 12 product teams — how do you ensure consistency, performance, and maintainability at scale without creating a CSS monolith?